package com.baseweb.webadmin.core.model.bvo;

import com.baseweb.webadmin.core.model.pojo.ByUserBizProduct;
import com.baseweb.webadmin.core.model.pojo.ByUserTrolley;
import com.baseweb.webadmin.core.model.pojo.User;
import org.joda.time.DateTime;

public class ByUserTrolleyBvo extends ByUserTrolley{

    private ByUserBizProduct product;

    private User user;

    public ByUserBizProduct getProduct() {
        return product;
    }

    public void setProduct(ByUserBizProduct product) {
        this.product = product;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public static ByUserTrolleyBvo copyFromByUserTrolley(ByUserTrolley byUserTrolley) {
        ByUserTrolleyBvo bvo = new ByUserTrolleyBvo();
        bvo.setId(byUserTrolley.getId());
        bvo.setUserId(byUserTrolley.getUserId());
        bvo.setProductId(byUserTrolley.getProductId());
        bvo.setScheduleDate(byUserTrolley.getScheduleDate());
        bvo.setDinnerType(byUserTrolley.getDinnerType());
        bvo.setAmount(byUserTrolley.getAmount());
        bvo.setDescn(byUserTrolley.getDescn());
        return bvo;
    }
}
